<?php
/**
 * Index.
 *
 * Collects and handles all the requests.
 *
 * Copyright (c) 2010-2011 Loic Chardonnet
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 */


include ('./system/macro.php');

/**
 * Model
 */
include (MODEL_DIR . 'database.php');
Database::getInstance();

/**
 * Smarty initialization.
 */
include (SMARTY_DIR . 'Smarty.class.php');

$smarty = new Smarty();

$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = CACHE_DIR;
$smarty->cache_dir = CACHE_DIR;

$smarty->assign('webroot', WEBROOT_DIR);
$smarty->assign('img', IMAGE_DIR);
$smarty->assign('favicon', IMAGE_DIR . 'favicon.ico');
$smarty->assign('design', STYLE_DIR . 'dop.css');

$smarty->assign('content', TEMPLATE_DIR);
$smarty->assign('connected', 'true');

$smarty->display(dirname(__FILE__) . '/view/layout.tpl');
